//////////////////////////////////////////////////////////////////////////////////
// Who  : Lim, Dong-moon (dmlim@nate.com, 011-701-9381)
// When : 2005/11/29
//////////////////////////////////////////////////////////////////////////////////

#ifndef __NCRYPT_BASE64__H__
#define __NCRYPT_BASE64__H__

#ifdef WIN32

#ifndef _WIN32_WCE
#include <crtdbg.h>
#endif

#include <tchar.h>

#else

#include <ncrypt_types.h>

#endif

char* EncodeBase64(const unsigned char* ascii, int size = 0, BOOL isURL = FALSE);
unsigned char* DecodeBase64(const char* base64, int src_len = 0, int* psize = 0);
char* EncodeBase16(const unsigned char* bin, int size = 0);
unsigned char* DecodeBase16(const char* hex, int src_len = 0, int* psize = 0);
void FreeBaseAlloced(void*);
int DetectBlobType(unsigned char* buf, unsigned int size);

#endif // __NCRYPT_BASE64__H__
